// src/api/order.js
import request from '../utils/request'

export const getAllOrders = (params) => {
  return request({
    url: '/api/order/getAllOrder',
    method: 'get',
    params
  })
}

// 添加获取单个订单详情的API
export const getOrderDetail = (orderNum) => {
  return request({
    url: '/api/order/getOrderDetail',
    method: 'get',
    params: { orderNum }
  })
}

export const updateOrderStatus = (data) => {
  return request({
    url: '/api/order/upOrder',
    method: 'post',
    data
  })
}

export const deleteOrder = (orderNum) => {
  return request({
    url: '/api/order/delOrder',
    method: 'post',
    data: { orderNum }
  })
}